<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div:first-child{
            width: 200px;
            height: 200px;
            background-color: pink;
            /* box-sizing: content-box;   以前的盒子模型*/
            padding: 10px;
            border: 2px solid red;
        }
        div:last-child{
            background-color: purple;
            width: 200px;
            height: 200px;
            padding: 10px;
            /* 增加padding和border不会影响盒子的大小，会从content里面扣除 */
            box-sizing: border-box;

        }
    </style>
</head>

<body>
    <div></div>


    <div></div>
</body>

</html>